package poo.exo1a;

public class Compte {
       
        private String nom;
        private int numero;
        public double solde;
       
        public Compte(String nom, int numero)
        {
                this.nom = nom;
                this.numero = numero;
                this.solde = 0;
        }      
        public Compte(String nom, int numero, double solde)
        {
                this.nom = nom;
                this.numero = numero;
                this.solde = solde;
        }
        public String getNom()
        {
                return this.nom;
        }
        public int getNumero()
        {
                return this.numero;
        }
        public void setSolde(double solde)
        {
                this.solde = solde;
        }
        public double getSolde()
        {
                return this.solde;
        }
        public String toString(){
                return "Compte de "+this.getNom()+" numero "+this.getNumero()+"\nSolde actuel = "+this.getSolde()+"\n";
        }
}
